<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://v1.com/pn" prefix="v1" %>

<div class="comment">
	<form method="post" id="commentForm" onsubmit="return checkComment();">
	<%--util.js --%>
		<input type="hidden" id="itemid" name="itemid" value="${item.itemid}">
		<input type="hidden" id="categoryid" name="categoryid" value="${category.categoryid}">
		用户名/电子邮件：<input type="text" id="visitor" name="visitor" value="" maxlength="20"/><br />
		<textarea cols="82" rows="5" id="comment" name="comment" ></textarea><br />
		<input type="button" value="评论" onclick="doComment();" />
	</form>
</div>
<br />

<c:forEach items="${comments}" var="it">
	<div class="comment_item">
		<span>
			评论：<c:out value="${it.comment}"></c:out><br /></span>
			<span style="color:#4272DB;"><c:out value="${empty it.visitor? '路人' : it.visitor}"></c:out></span>
	</div>
</c:forEach>
<v1:pn name="pageinfo" href="./category.html?categoryid=${category.categoryid}&itemid=${item.itemid}&page={0}"></v1:pn>
